home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 33 / 033.d81 / division tutor (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  995b  |  31 lines

  1. 0 a=a+1:ifa=1thenload"dt.font",8,1
  2. 1 poke55,255:poke56,55:clr
  3. 2 dim g$(5):bk$="[164]":poke53272,(peek(53272)and240)or14
  4. 5 poke53280,5:poke53281,7:goto100
  5. 10 poke54276,.:poke54296,15:poke54273,h:poke54272,l
  6. 20 poke54277,10:poke54278,10:poke54276,33:return
  7. 100 print"[147][144] division tutor - richard l. eberhardy":j=rnd(-ti)
  8. 110 forj=1to10
  9. 120 a%=10*rnd(1)+1:b%=10*rnd(1)+1:c%=a%*b%
  10. 130 print"what is";c%;"/";b%"?  type 'q' to quit.":print">"bk$;
  11. 135 nc=5:gosub1000:d=val(a$):ifa$="q"then6000
  12. 140 ifd=a%thenh=50:gosub10:print"correct!":e=e+1
  13. 150 ifd<>a%thenh=5:gosub10:print"wrong! the answer is";a%
  14. 160 next
  15. 170 print"you got";e;"out of 10 right, or";e*10;"[157]%"
  16. 180 print"would you like to do more?    (y-n)":print">"bk$;
  17. 190 nc=1:gosub1000:ifa$<>"y"anda$<>"n"thenprint"[145][145][145][145]";:goto180
  18. 200 ifa$="y"then1
  19. 210 goto6000
  20. 1000 fora=1tonc
  21. 1020 geta$:ifa$=""then1020
  22. 1025 ifa$=chr$(13)thenprint"[157] ":goto1050
  23. 1026 if(a$=chr$(20))and(a>1)thena=a-1:print"[157][157]  [157][157]"bk$;:goto1020
  24. 1030 ifa$<"0"ora$>"z"then1020
  25. 1040 g$(a)=a$:print"[157]"a$bk$;:next
  26. 1045 print"[157] "
  27. 1050 a$="":forb=1toa-1:a$=a$+g$(b):next:return
  28. 6000 print"[147]";:open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  29. 6005 ifer<>63thenend
  30. 6010 poke55,.:poke56,160:poke53272,23:load"hello connect",8
  31.